package com.sxbbc.common.basics.rest;

import com.sxbbc.common.basics.enums.ResponseEnums;

/**
 * 
 * Rest响应体
 * @author Wahyee
 */
public class RestResponse {
	
	private String code;
	
	private String msg;
	
	private Object data;
	
	private long count;
	
	
	

	public RestResponse() {
		super();
	}
	
	public RestResponse(String code, String msg) {
		super();
		this.code = code;
		this.msg = msg;
	}

	public RestResponse(String code, String msg,Object data) {
		this.code = code;
		this.msg = msg;
		this.data=data;
	}

	public RestResponse(String code, Object data) {
		super();
		this.code = code;
		this.data = data;
	}

	public RestResponse(String code, String msg, Object data, long count) {
		super();
		this.code = code;
		this.msg = msg;
		this.data = data;
		this.count = count;
	}

	public RestResponse(ResponseEnums responseEnums) {
		super();
		this.code = responseEnums.getCode();
		this.msg = responseEnums.getDescription();
		this.data = null;
	}

	public RestResponse(ResponseEnums responseEnums,Object data) {
		super();
		this.code = responseEnums.getCode();
		this.msg = responseEnums.getDescription();
		this.data = data;
	}

	public RestResponse(ResponseEnums responseEnums,Object data, long count) {
		super();
		this.code = responseEnums.getCode();
		this.msg = responseEnums.getDescription();
		this.data = data;
		this.count = count;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public long getCount() {
		return count;
	}

	public void setCount(long count) {
		this.count = count;
	}
	
}
